<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Find the word</title>
    <link rel="stylesheet" href="base.css">
    <script src="jQuery.js"></script>
    <style>
        #center form button{
            width: 150px;
            height: 40px;
            border: none;
            border-radius: 8px;
            margin-left: 20px;
            margin-top: 100px;
            margin-right: 200px;
        }
        #res{
            width: 520px;
            padding: 10px 10px;
            border: 2px solid red;
            border-radius: 5px;
            background-color: antiquewhite;
            margin-top: 100px;
        }
    </style>
</head>
<body>
    <div id="head">
        <img src="image/tedu.jpg" alt="">
    </div>
    <div id="center">
        <form action="/find" method="get" onsubmit="return checkWord();">
            <div>
                <input id="word" type="text" name="word">
                <button>find the word</button>
            </div>
        </form>
        <h1 id="res"><br></h1>
    </div>
    <script>
        function checkWord(){
            var wordLenth = $("#word").val().length;
            if(wordLenth == 0){
                alert("Please enter a word");
                return false;
            }
            return true;
        }
    </script>
</body>
</html>